#!/bin/bash

export JAVA_TOOL_OPTIONS="-javaagent:/opt/[[project.artifactId]]-[[project.version]].jar ${JAVA_TOOL_OPTIONS}"

export ELASTIC_APM_SERVICE_NAME="${AWS_LAMBDA_FUNCTION_NAME}"
export ELASTIC_APM_AWS_LAMBDA_HANDLER="${_HANDLER}"
export ELASTIC_APM_METRICS_INTERVAL="0s"
export ELASTIC_APM_CENTRAL_CONFIG="false"
export ELASTIC_APM_CLOUD_PROVIDER="none"

exec "$@"